package com.work.demo.serialized;

import org.apache.commons.lang.math.NumberUtils;

import java.io.Serializable;

public class Employee implements Serializable {
    private String id;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getLongId() {
        long l = NumberUtils.toLong(id, -9182387012356L);
        return l == -9182387012356L ? null : l;
    }

    /**
     * null
     * @param id
     */
    public void setLongId(Long id) {
        if (this.id != null && id == null) {
            return;
        }
        this.id = id == null ? "" : id + "";
    }
}
